Find the vector $\mathbf{v}$ such that
\[\operatorname{proj}_{\begin{pmatrix} 2 \\ 1 \end{pmatrix}} \mathbf{v} = \begin{pmatrix} \frac{38}{5} \\ \frac{19}{5} \end{pmatrix}\]and
\[\operatorname{proj}_{\begin{pmatrix} 2 \\ 3 \end{pmatrix}} \mathbf{v} = \begin{pmatrix} \frac{58}{13} \\ \frac{87}{13} \end{pmatrix}.\]
Explanation: Let $\mathbf{v} = \begin{pmatrix} x \\ y \end{pmatrix}.$

[asy]
usepackage("amsmath");

unitsize(0.6 cm);

pair P, Q, V;

V = (7,5);
P = (38/5,19/5);
Q = (58/13,87/13);

draw((-1,0)--(8,0));
draw((0,-1)--(0,7));
draw((0,0)--V,Arrow(6));
draw(V--P,dashed);
draw((-1,-1/2)--(8,4));
draw((0,0)--P,red,Arrow(6));
draw((-2/3,-1)--(2/3*7,7));
draw(V--Q,dashed);
draw((0,0)--Q,red,Arrow(6));

label("$\mathbf{v}$", V, NE);
label("$\begin{pmatrix} \frac{38}{5} \\ \frac{19}{5} \end{pmatrix}$", P, SE);
label("$\begin{pmatrix} \frac{58}{13} \\ \frac{87}{13} \end{pmatrix}$", Q, NW);
[/asy]

Then by the properties of projections,
\[\left( \begin{pmatrix} x \\ y \end{pmatrix} - \begin{pmatrix} \frac{38}{5} \\ \frac{19}{5} \end{pmatrix} \right) \cdot \begin{pmatrix} 2 \\ 1 \end{pmatrix} = 0,\]and
\[\left( \begin{pmatrix} x \\ y \end{pmatrix} - \begin{pmatrix} \frac{58}{13} \\ \frac{87}{13} \end{pmatrix} \right) \cdot \begin{pmatrix} 2 \\ 3 \end{pmatrix} = 0.\]These lead to the equations
\[2 \left( x - \frac{38}{5} \right) + \left( y - \frac{19}{5} \right) = 0\]and
\[2 \left( x - \frac{58}{13} \right) + 3 \left( y - \frac{87}{13} \right) = 0.\]Solving, we find $x = 7$ and $y = 5,$ so $\mathbf{v} = \boxed{\begin{pmatrix} 7 \\ 5 \end{pmatrix}}.$